package com.sinan;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;

import java.nio.file.Paths;

@SpringBootApplication
@Slf4j
public class SinanApplication {

    public static void main(String[] args) {
        SpringApplication.run(SinanApplication.class, args);
    }

    @Bean
    public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
        return args -> {
            log.info("Running command line runner, {}", Paths.get("./../").toAbsolutePath().normalize());
        };
    }
}
